﻿#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QPushButton>
#include <QDebug>
#include "modbustcp.h"

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();

    ModbusTCP *p;

    //TCP连接函数
    void TcpConnect();
    //TCP断开函数
    void TcpDisConnect();

private:
    Ui::Widget *ui;


private slots:
    void showReceiveMessage();

};
#endif // WIDGET_H
